Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add completions sub-command to generate shell completion scripts #592

Merged
merged 2 commits into from
Mar 18, 2024

Conversation

citrus-it
Copy link
Contributor

No description provided.

@citrus-it citrus-it requested review from david-crespo and ahl March 12, 2024 09:16
@citrus-it citrus-it changed the title Add generate-completions sub-command Add completions sub-command to generate shell completion scripts Mar 12, 2024
@citrus-it citrus-it force-pushed the andy/generate branch 3 times, most recently from 9e7c633 to 97e8037 Compare March 12, 2024 09:30
///
/// and import this by adding the following to `~/.config/elvish/rc.elv`
///
/// use oxide
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful comment, might need formatting tweaks depending on how it renders on the docs site. I believe we treat this as markdown. Testing now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Working on a PR to this PR since my iteration cycle alone is a lot faster than me suggesting changes to you and you pushing commits and me testing them.

image

pub struct CmdCompletion {
/// Type of the shell
#[clap(short, long)]
shell: Shell,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comes out perfectly in the docs. Great.

image

@david-crespo
Copy link
Contributor

david-crespo commented Mar 12, 2024

Final product of my edit

image

CLI output

Uglier than before but tolerable. I've added #593 about rendering this markdown in the CLI as well.

image

Copy link
Contributor

@david-crespo david-crespo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. My only concern is #594, separating meta commands like this from the rest in the docs site sidebar, but it's not a blocker.

@citrus-it
Copy link
Contributor Author

Thanks for fixing up the docs site rendering!

Copy link
Collaborator

@ahl ahl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excellent! ship it!

@ahl ahl merged commit 8fc14f8 into main Mar 18, 2024
16 checks passed
@ahl ahl deleted the andy/generate branch March 18, 2024 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants